#> [1] "https://api.subquery.network/sq/AcalaNetwork/karura-loan"
#> [1] "1 60"
#> [1] "1 100"
#> [1] "2 100"
#> [1] "3 100"
#> [1] "4 100"
#> [1] "5 100"
#> [1] "6 100"
#> [1] "7 100"
#> [1] "8 100"
#> [1] "9 100"
#> [1] "10 100"
#> [1] "11 100"
#> [1] "12 100"
#> [1] "13 100"
#> [1] "14 100"
#> [1] "15 100"
#> [1] "16 100"
#> [1] "17 100"
#> [1] "18 100"
#> [1] "19 100"
#> [1] "20 100"
#> [1] "21 100"
#> [1] "22 100"
#> [1] "23 100"
#> [1] "24 100"
#> [1] "25 100"
#> [1] "26 100"
#> [1] "27 100"
#> [1] "28 100"
#> [1] "29 100"
#> [1] "30 77"
#> [1] "1 100"
#> [1] "2 100"
#> [1] "3 100"
#> [1] "4 100"
#> [1] "5 100"
#> [1] "6 100"
#> [1] "7 100"
#> [1] "8 100"
#> [1] "9 100"
#> [1] "10 100"
#> [1] "11 100"
#> [1] "12 100"
#> [1] "13 100"
#> [1] "14 100"
#> [1] "15 100"
#> [1] "16 100"
#> [1] "17 100"
#> [1] "18 100"
#> [1] "19 100"
#> [1] "20 100"
#> [1] "21 67"
#> [1] "1 100"
#> [1] "2 100"
#> [1] "3 55"
#> [1] "1 100"
#> [1] "2 100"
#> [1] "3 100"
#> [1] "4 100"
#> [1] "5 100"
#> [1] "6 100"
#> [1] "7 100"
#> [1] "8 100"
#> [1] "9 100"
#> [1] "10 100"
#> [1] "11 100"
#> [1] "12 100"
#> [1] "13 100"
#> [1] "14 100"
#> [1] "15 100"
#> [1] "16 100"
#> [1] "17 100"
#> [1] "18 100"
#> [1] "19 100"
#> [1] "20 100"
#> [1] "21 100"
#> [1] "22 100"
#> [1] "23 100"
#> [1] "24 100"
#> [1] "25 100"
#> [1] "26 100"
#> [1] "27 100"
#> [1] "28 100"
#> [1] "29 100"
#> [1] "30 100"
#> [1] "31 100"
#> [1] "32 100"
#> [1] "33 100"
#> [1] "34 100"
#> [1] "35 100"
#> [1] "36 100"
#> [1] "37 100"
#> [1] "38 100"
#> [1] "39 100"
#> [1] "40 100"
#> [1] "41 100"
#> [1] "42 100"
#> [1] "43 100"
#> [1] "44 100"
#> [1] "45 100"
#> [1] "46 100"
#> [1] "47 100"
#> [1] "48 100"
#> [1] "49 100"
#> [1] "50 100"
#> [1] "51 100"
#> [1] "52 100"
#> [1] "53 100"
#> [1] "54 100"
#> [1] "55 100"
#> [1] "56 100"
#> [1] "57 100"
#> [1] "58 100"
#> [1] "59 100"
#> [1] "60 100"
#> [1] "61 100"
#> [1] "62 100"
#> [1] "63 100"
#> [1] "64 100"
#> [1] "65 100"
#> [1] "66 100"
#> [1] "67 100"
#> [1] "68 100"
#> [1] "69 100"
#> [1] "70 100"
#> [1] "71 100"
#> [1] "72 100"
#> [1] "73 100"
#> [1] "74 100"
#> [1] "75 100"
#> [1] "76 100"
#> [1] "77 100"
#> [1] "78 100"
#> [1] "79 100"
#> [1] "80 100"
#> [1] "81 100"
#> [1] "82 100"
#> [1] "83 100"
#> [1] "84 100"
#> [1] "85 100"
#> [1] "86 100"
#> [1] "87 100"
#> [1] "88 100"
#> [1] "89 100"
#> [1] "90 100"
#> [1] "91 100"
#> [1] "92 100"
#> [1] "93 100"
#> [1] "94 100"
#> [1] "95 100"
#> [1] "96 100"
#> [1] "97 100"
#> [1] "98 100"
#> [1] "99 100"
#> [1] "100 100"
#> [1] "101 100"
#> [1] "102 100"
#> [1] "103 100"
#> [1] "104 100"
#> [1] "105 100"
#> [1] "106 100"
#> [1] "107 100"
#> [1] "108 100"
#> [1] "109 100"
#> [1] "110 100"
#> [1] "111 100"
#> [1] "112 100"
#> [1] "113 100"
#> [1] "114 100"
#> [1] "115 100"
#> [1] "116 100"
#> [1] "117 100"
#> [1] "118 100"
#> [1] "119 100"
#> [1] "120 100"
#> [1] "121 100"
#> [1] "122 100"
#> [1] "123 100"
#> [1] "124 100"
#> [1] "125 100"
#> [1] "126 100"
#> [1] "127 100"
#> [1] "128 100"
#> [1] "129 100"
#> [1] "130 100"
#> [1] "131 100"
#> [1] "132 100"
#> [1] "133 100"
#> [1] "134 100"
#> [1] "135 100"
#> [1] "136 100"
#> [1] "137 100"
#> [1] "138 100"
#> [1] "139 100"
#> [1] "140 100"
#> [1] "141 100"
#> [1] "142 100"
#> [1] "143 100"
#> [1] "144 100"
#> [1] "145 100"
#> [1] "146 100"
#> [1] "147 100"
#> [1] "148 100"
#> [1] "149 100"
#> [1] "150 100"
#> [1] "151 100"
#> [1] "152 100"
#> [1] "153 100"
#> [1] "154 100"
#> [1] "155 100"
#> [1] "156 100"
#> [1] "157 100"
#> [1] "158 100"
#> [1] "159 100"
#> [1] "160 100"
#> [1] "161 100"
#> [1] "162 100"
#> [1] "163 100"
#> [1] "164 100"
#> [1] "165 100"
#> [1] "166 100"
#> [1] "167 100"
#> [1] "168 100"
#> [1] "169 100"
#> [1] "170 100"
#> [1] "171 100"
#> [1] "172 100"
#> [1] "173 100"
#> [1] "174 100"
#> [1] "175 100"
#> [1] "176 100"
#> [1] "177 100"
#> [1] "178 100"
#> [1] "179 100"
#> [1] "180 100"
#> [1] "181 100"
#> [1] "182 100"
#> [1] "183 100"
#> [1] "184 100"
#> [1] "185 100"
#> [1] "186 100"
#> [1] "187 100"
#> [1] "188 100"
#> [1] "189 100"
#> [1] "190 100"
#> [1] "191 100"
#> [1] "192 100"
#> [1] "193 100"
#> [1] "194 100"
#> [1] "195 100"
#> [1] "196 100"
#> [1] "197 100"
#> [1] "198 100"
#> [1] "199 100"
#> [1] "200 100"
#> [1] "201 100"
#> [1] "202 100"
#> [1] "203 100"
#> [1] "204 100"
#> [1] "205 100"
#> [1] "206 100"
#> [1] "207 100"
#> [1] "208 100"
#> [1] "209 100"
#> [1] "210 57"
#> 
  |                                                                                    
  |                                                                              |   0%
  |                                                                                    
  |...                                                                           |   3%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |.....                                                                         |   7%
#> label: custom2 (with options) 
#> List of 2
#>  $ echo  : logi FALSE
#>  $ engine: chr "css"
#> 
#> 
  |                                                                                    
  |........                                                                      |  10%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..........                                                                    |  13%
#> label: init (with options) 
#> List of 1
#>  $ include: logi FALSE
#> 
#> 
  |                                                                                    
  |.............                                                                 |  17%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |................                                                              |  20%
#> label: unnamed-chunk-1
#> 
  |                                                                                    
  |..................                                                            |  23%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |.....................                                                         |  27%
#> label: unnamed-chunk-2
#> 
  |                                                                                    
  |.......................                                                       |  30%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..........................                                                    |  33%
#> label: unnamed-chunk-3
#> 
  |                                                                                    
  |.............................                                                 |  37%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |...............................                                               |  40%
#> label: unnamed-chunk-4
#> 
  |                                                                                    
  |..................................                                            |  43%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |....................................                                          |  47%
#> label: unnamed-chunk-5
#> 
  |                                                                                    
  |.......................................                                       |  50%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..........................................                                    |  53%
#> label: unnamed-chunk-6
#> 
  |                                                                                    
  |............................................                                  |  57%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |...............................................                               |  60%
#> label: unnamed-chunk-7
#> 
  |                                                                                    
  |.................................................                             |  63%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |....................................................                          |  67%
#> label: unnamed-chunk-8
#> 
  |                                                                                    
  |.......................................................                       |  70%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |.........................................................                     |  73%
#> label: unnamed-chunk-9
#> 
  |                                                                                    
  |............................................................                  |  77%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..............................................................                |  80%
#> label: unnamed-chunk-10
#> 
  |                                                                                    
  |.................................................................             |  83%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |....................................................................          |  87%
#> label: unnamed-chunk-11
#> 
  |                                                                                    
  |......................................................................        |  90%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |.........................................................................     |  93%
#> label: unnamed-chunk-12
#> 
  |                                                                                    
  |...........................................................................   |  97%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..............................................................................| 100%
#> label: unnamed-chunk-13
#> 
#> /Applications/RStudio.app/Contents/MacOS/pandoc/pandoc +RTS -K512m -RTS Swap_template.knit.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output /Users/rjbos2/R_HOME/websites/web_acala/content/swap_Karura_ALL.html --lua-filter /Library/Frameworks/R.framework/Versions/4.1/Resources/library/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /Library/Frameworks/R.framework/Versions/4.1/Resources/library/rmarkdown/rmarkdown/lua/latex-div.lua --self-contained --variable bs3=TRUE --standalone --section-divs --template /Library/Frameworks/R.framework/Versions/4.1/Resources/library/flexdashboard/rmarkdown/templates/flex_dashboard/resources/default.html --variable theme=cosmo --mathjax --variable 'mathjax-url=https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' --include-in-header /var/folders/pf/8_rzvpr95ybbr5n31grmh4dc0000gp/T//RtmpVJNnmp/rmarkdown-str3e6f31d4ff89.html --include-in-header /var/folders/pf/8_rzvpr95ybbr5n31grmh4dc0000gp/T//RtmpVJNnmp/file3e6f16d494eehtml --highlight-style pygments --include-before-body /var/folders/pf/8_rzvpr95ybbr5n31grmh4dc0000gp/T//RtmpVJNnmp/file3e6f5e7da0f7.html --include-after-body /var/folders/pf/8_rzvpr95ybbr5n31grmh4dc0000gp/T//RtmpVJNnmp/file3e6f9d2e898.html 
#> 
  |                                                                                    
  |                                                                              |   0%
  |                                                                                    
  |...                                                                           |   3%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |.....                                                                         |   7%
#> label: custom2 (with options) 
#> List of 2
#>  $ echo  : logi FALSE
#>  $ engine: chr "css"
#> 
#> 
  |                                                                                    
  |........                                                                      |  10%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..........                                                                    |  13%
#> label: init (with options) 
#> List of 1
#>  $ include: logi FALSE
#> 
#> 
  |                                                                                    
  |.............                                                                 |  17%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |................                                                              |  20%
#> label: unnamed-chunk-1
#> 
  |                                                                                    
  |..................                                                            |  23%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |.....................                                                         |  27%
#> label: unnamed-chunk-2
#> 
  |                                                                                    
  |.......................                                                       |  30%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..........................                                                    |  33%
#> label: unnamed-chunk-3
#> 
  |                                                                                    
  |.............................                                                 |  37%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |...............................                                               |  40%
#> label: unnamed-chunk-4
#> 
  |                                                                                    
  |..................................                                            |  43%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |....................................                                          |  47%
#> label: unnamed-chunk-5
#> 
  |                                                                                    
  |.......................................                                       |  50%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..........................................                                    |  53%
#> label: unnamed-chunk-6
#> 
  |                                                                                    
  |............................................                                  |  57%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |...............................................                               |  60%
#> label: unnamed-chunk-7
#> 
  |                                                                                    
  |.................................................                             |  63%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |....................................................                          |  67%
#> label: unnamed-chunk-8
#> 
  |                                                                                    
  |.......................................................                       |  70%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |.........................................................                     |  73%
#> label: unnamed-chunk-9
#> 
  |                                                                                    
  |............................................................                  |  77%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..............................................................                |  80%
#> label: unnamed-chunk-10
#> 
  |                                                                                    
  |.................................................................             |  83%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |....................................................................          |  87%
#> label: unnamed-chunk-11
#> 
  |                                                                                    
  |......................................................................        |  90%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |.........................................................................     |  93%
#> label: unnamed-chunk-12
#> 
  |                                                                                    
  |...........................................................................   |  97%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..............................................................................| 100%
#> label: unnamed-chunk-13
#> 
#> /Applications/RStudio.app/Contents/MacOS/pandoc/pandoc +RTS -K512m -RTS Swap_template.knit.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output pandoc3e6f5b72239b.html --lua-filter /Library/Frameworks/R.framework/Versions/4.1/Resources/library/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /Library/Frameworks/R.framework/Versions/4.1/Resources/library/rmarkdown/rmarkdown/lua/latex-div.lua --self-contained --variable bs3=TRUE --standalone --section-divs --template /Library/Frameworks/R.framework/Versions/4.1/Resources/library/flexdashboard/rmarkdown/templates/flex_dashboard/resources/default.html --variable theme=cosmo --mathjax --variable 'mathjax-url=https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' --include-in-header /var/folders/pf/8_rzvpr95ybbr5n31grmh4dc0000gp/T//RtmpVJNnmp/rmarkdown-str3e6f6f44f5c4.html --include-in-header /var/folders/pf/8_rzvpr95ybbr5n31grmh4dc0000gp/T//RtmpVJNnmp/file3e6f18634feehtml --highlight-style pygments --include-before-body /var/folders/pf/8_rzvpr95ybbr5n31grmh4dc0000gp/T//RtmpVJNnmp/file3e6f20149ec4.html --include-after-body /var/folders/pf/8_rzvpr95ybbr5n31grmh4dc0000gp/T//RtmpVJNnmp/file3e6f29c36650.html 
#> 
  |                                                                                    
  |                                                                              |   0%
  |                                                                                    
  |...                                                                           |   3%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |.....                                                                         |   7%
#> label: custom2 (with options) 
#> List of 2
#>  $ echo  : logi FALSE
#>  $ engine: chr "css"
#> 
#> 
  |                                                                                    
  |........                                                                      |  10%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..........                                                                    |  13%
#> label: init (with options) 
#> List of 1
#>  $ include: logi FALSE
#> 
#> 
  |                                                                                    
  |.............                                                                 |  17%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |................                                                              |  20%
#> label: unnamed-chunk-1
#> 
  |                                                                                    
  |..................                                                            |  23%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |.....................                                                         |  27%
#> label: unnamed-chunk-2
#> 
  |                                                                                    
  |.......................                                                       |  30%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..........................                                                    |  33%
#> label: unnamed-chunk-3
#> 
  |                                                                                    
  |.............................                                                 |  37%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |...............................                                               |  40%
#> label: unnamed-chunk-4
#> 
  |                                                                                    
  |..................................                                            |  43%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |....................................                                          |  47%
#> label: unnamed-chunk-5
#> 
  |                                                                                    
  |.......................................                                       |  50%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..........................................                                    |  53%
#> label: unnamed-chunk-6
#> 
  |                                                                                    
  |............................................                                  |  57%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |...............................................                               |  60%
#> label: unnamed-chunk-7
#> 
  |                                                                                    
  |.................................................                             |  63%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |....................................................                          |  67%
#> label: unnamed-chunk-8
#> 
  |                                                                                    
  |.......................................................                       |  70%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |.........................................................                     |  73%
#> label: unnamed-chunk-9
#> 
  |                                                                                    
  |............................................................                  |  77%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..............................................................                |  80%
#> label: unnamed-chunk-10
#> 
  |                                                                                    
  |.................................................................             |  83%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |....................................................................          |  87%
#> label: unnamed-chunk-11
#> 
  |                                                                                    
  |......................................................................        |  90%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |.........................................................................     |  93%
#> label: unnamed-chunk-12
#> 
  |                                                                                    
  |...........................................................................   |  97%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..............................................................................| 100%
#> label: unnamed-chunk-13
#> 
#> /Applications/RStudio.app/Contents/MacOS/pandoc/pandoc +RTS -K512m -RTS Swap_template.knit.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output pandoc3e6f2f750557.html --lua-filter /Library/Frameworks/R.framework/Versions/4.1/Resources/library/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /Library/Frameworks/R.framework/Versions/4.1/Resources/library/rmarkdown/rmarkdown/lua/latex-div.lua --self-contained --variable bs3=TRUE --standalone --section-divs --template /Library/Frameworks/R.framework/Versions/4.1/Resources/library/flexdashboard/rmarkdown/templates/flex_dashboard/resources/default.html --variable theme=cosmo --mathjax --variable 'mathjax-url=https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' --include-in-header /var/folders/pf/8_rzvpr95ybbr5n31grmh4dc0000gp/T//RtmpVJNnmp/rmarkdown-str3e6f45bccb9.html --include-in-header /var/folders/pf/8_rzvpr95ybbr5n31grmh4dc0000gp/T//RtmpVJNnmp/file3e6f26dd87ebhtml --highlight-style pygments --include-before-body /var/folders/pf/8_rzvpr95ybbr5n31grmh4dc0000gp/T//RtmpVJNnmp/file3e6f1a06693c.html --include-after-body /var/folders/pf/8_rzvpr95ybbr5n31grmh4dc0000gp/T//RtmpVJNnmp/file3e6f1ae6ef7d.html 
#> 
  |                                                                                    
  |                                                                              |   0%
  |                                                                                    
  |...                                                                           |   3%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |.....                                                                         |   7%
#> label: custom2 (with options) 
#> List of 2
#>  $ echo  : logi FALSE
#>  $ engine: chr "css"
#> 
#> 
  |                                                                                    
  |........                                                                      |  10%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..........                                                                    |  13%
#> label: init (with options) 
#> List of 1
#>  $ include: logi FALSE
#> 
#> 
  |                                                                                    
  |.............                                                                 |  17%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |................                                                              |  20%
#> label: unnamed-chunk-1
#> 
  |                                                                                    
  |..................                                                            |  23%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |.....................                                                         |  27%
#> label: unnamed-chunk-2
#> 
  |                                                                                    
  |.......................                                                       |  30%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..........................                                                    |  33%
#> label: unnamed-chunk-3
#> 
  |                                                                                    
  |.............................                                                 |  37%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |...............................                                               |  40%
#> label: unnamed-chunk-4
#> 
  |                                                                                    
  |..................................                                            |  43%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |....................................                                          |  47%
#> label: unnamed-chunk-5
#> 
  |                                                                                    
  |.......................................                                       |  50%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..........................................                                    |  53%
#> label: unnamed-chunk-6
#> 
  |                                                                                    
  |............................................                                  |  57%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |...............................................                               |  60%
#> label: unnamed-chunk-7
#> 
  |                                                                                    
  |.................................................                             |  63%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |....................................................                          |  67%
#> label: unnamed-chunk-8
#> 
  |                                                                                    
  |.......................................................                       |  70%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |.........................................................                     |  73%
#> label: unnamed-chunk-9
#> 
  |                                                                                    
  |............................................................                  |  77%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..............................................................                |  80%
#> label: unnamed-chunk-10
#> 
  |                                                                                    
  |.................................................................             |  83%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |....................................................................          |  87%
#> label: unnamed-chunk-11
#> 
  |                                                                                    
  |......................................................................        |  90%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |.........................................................................     |  93%
#> label: unnamed-chunk-12
#> 
  |                                                                                    
  |...........................................................................   |  97%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..............................................................................| 100%
#> label: unnamed-chunk-13
#> 
#> /Applications/RStudio.app/Contents/MacOS/pandoc/pandoc +RTS -K512m -RTS Swap_template.knit.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output pandoc3e6f6f339096.html --lua-filter /Library/Frameworks/R.framework/Versions/4.1/Resources/library/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /Library/Frameworks/R.framework/Versions/4.1/Resources/library/rmarkdown/rmarkdown/lua/latex-div.lua --self-contained --variable bs3=TRUE --standalone --section-divs --template /Library/Frameworks/R.framework/Versions/4.1/Resources/library/flexdashboard/rmarkdown/templates/flex_dashboard/resources/default.html --variable theme=cosmo --mathjax --variable 'mathjax-url=https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' --include-in-header /var/folders/pf/8_rzvpr95ybbr5n31grmh4dc0000gp/T//RtmpVJNnmp/rmarkdown-str3e6f1fd94980.html --include-in-header /var/folders/pf/8_rzvpr95ybbr5n31grmh4dc0000gp/T//RtmpVJNnmp/file3e6f726882d5html --highlight-style pygments --include-before-body /var/folders/pf/8_rzvpr95ybbr5n31grmh4dc0000gp/T//RtmpVJNnmp/file3e6f2b65a8a1.html --include-after-body /var/folders/pf/8_rzvpr95ybbr5n31grmh4dc0000gp/T//RtmpVJNnmp/file3e6f1f21f849.html 
#> 
  |                                                                                    
  |                                                                              |   0%
  |                                                                                    
  |...                                                                           |   3%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |.....                                                                         |   7%
#> label: custom2 (with options) 
#> List of 2
#>  $ echo  : logi FALSE
#>  $ engine: chr "css"
#> 
#> 
  |                                                                                    
  |........                                                                      |  10%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..........                                                                    |  13%
#> label: init (with options) 
#> List of 1
#>  $ include: logi FALSE
#> 
#> 
  |                                                                                    
  |.............                                                                 |  17%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |................                                                              |  20%
#> label: unnamed-chunk-1
#> 
  |                                                                                    
  |..................                                                            |  23%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |.....................                                                         |  27%
#> label: unnamed-chunk-2
#> 
  |                                                                                    
  |.......................                                                       |  30%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..........................                                                    |  33%
#> label: unnamed-chunk-3
#> 
  |                                                                                    
  |.............................                                                 |  37%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |...............................                                               |  40%
#> label: unnamed-chunk-4
#> 
  |                                                                                    
  |..................................                                            |  43%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |....................................                                          |  47%
#> label: unnamed-chunk-5
#> 
  |                                                                                    
  |.......................................                                       |  50%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..........................................                                    |  53%
#> label: unnamed-chunk-6
#> 
  |                                                                                    
  |............................................                                  |  57%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |...............................................                               |  60%
#> label: unnamed-chunk-7
#> 
  |                                                                                    
  |.................................................                             |  63%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |....................................................                          |  67%
#> label: unnamed-chunk-8
#> 
  |                                                                                    
  |.......................................................                       |  70%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |.........................................................                     |  73%
#> label: unnamed-chunk-9
#> 
  |                                                                                    
  |............................................................                  |  77%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..............................................................                |  80%
#> label: unnamed-chunk-10
#> 
  |                                                                                    
  |.................................................................             |  83%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |....................................................................          |  87%
#> label: unnamed-chunk-11
#> 
  |                                                                                    
  |......................................................................        |  90%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |.........................................................................     |  93%
#> label: unnamed-chunk-12
#> 
  |                                                                                    
  |...........................................................................   |  97%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..............................................................................| 100%
#> label: unnamed-chunk-13
#> 
#> /Applications/RStudio.app/Contents/MacOS/pandoc/pandoc +RTS -K512m -RTS Swap_template.knit.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output pandoc3e6f698503fd.html --lua-filter /Library/Frameworks/R.framework/Versions/4.1/Resources/library/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /Library/Frameworks/R.framework/Versions/4.1/Resources/library/rmarkdown/rmarkdown/lua/latex-div.lua --self-contained --variable bs3=TRUE --standalone --section-divs --template /Library/Frameworks/R.framework/Versions/4.1/Resources/library/flexdashboard/rmarkdown/templates/flex_dashboard/resources/default.html --variable theme=cosmo --mathjax --variable 'mathjax-url=https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' --include-in-header /var/folders/pf/8_rzvpr95ybbr5n31grmh4dc0000gp/T//RtmpVJNnmp/rmarkdown-str3e6f6cb63d0e.html --include-in-header /var/folders/pf/8_rzvpr95ybbr5n31grmh4dc0000gp/T//RtmpVJNnmp/file3e6f306299e4html --highlight-style pygments --include-before-body /var/folders/pf/8_rzvpr95ybbr5n31grmh4dc0000gp/T//RtmpVJNnmp/file3e6f1965608d.html --include-after-body /var/folders/pf/8_rzvpr95ybbr5n31grmh4dc0000gp/T//RtmpVJNnmp/file3e6f4ea5d601.html 
#> 
  |                                                                                    
  |                                                                              |   0%
  |                                                                                    
  |...                                                                           |   3%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |.....                                                                         |   7%
#> label: custom2 (with options) 
#> List of 2
#>  $ echo  : logi FALSE
#>  $ engine: chr "css"
#> 
#> 
  |                                                                                    
  |........                                                                      |  10%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..........                                                                    |  13%
#> label: init (with options) 
#> List of 1
#>  $ include: logi FALSE
#> 
#> 
  |                                                                                    
  |.............                                                                 |  17%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |................                                                              |  20%
#> label: unnamed-chunk-1
#> 
  |                                                                                    
  |..................                                                            |  23%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |.....................                                                         |  27%
#> label: unnamed-chunk-2
#> 
  |                                                                                    
  |.......................                                                       |  30%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..........................                                                    |  33%
#> label: unnamed-chunk-3
#> 
  |                                                                                    
  |.............................                                                 |  37%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |...............................                                               |  40%
#> label: unnamed-chunk-4
#> 
  |                                                                                    
  |..................................                                            |  43%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |....................................                                          |  47%
#> label: unnamed-chunk-5
#> 
  |                                                                                    
  |.......................................                                       |  50%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..........................................                                    |  53%
#> label: unnamed-chunk-6
#> 
  |                                                                                    
  |............................................                                  |  57%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |...............................................                               |  60%
#> label: unnamed-chunk-7
#> 
  |                                                                                    
  |.................................................                             |  63%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |....................................................                          |  67%
#> label: unnamed-chunk-8
#> 
  |                                                                                    
  |.......................................................                       |  70%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |.........................................................                     |  73%
#> label: unnamed-chunk-9
#> 
  |                                                                                    
  |............................................................                  |  77%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..............................................................                |  80%
#> label: unnamed-chunk-10
#> 
  |                                                                                    
  |.................................................................             |  83%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |....................................................................          |  87%
#> label: unnamed-chunk-11
#> 
  |                                                                                    
  |......................................................................        |  90%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |.........................................................................     |  93%
#> label: unnamed-chunk-12
#> 
  |                                                                                    
  |...........................................................................   |  97%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..............................................................................| 100%
#> label: unnamed-chunk-13
#> 
#> /Applications/RStudio.app/Contents/MacOS/pandoc/pandoc +RTS -K512m -RTS Swap_template.knit.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output pandoc3e6f5a404bbb.html --lua-filter /Library/Frameworks/R.framework/Versions/4.1/Resources/library/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /Library/Frameworks/R.framework/Versions/4.1/Resources/library/rmarkdown/rmarkdown/lua/latex-div.lua --self-contained --variable bs3=TRUE --standalone --section-divs --template /Library/Frameworks/R.framework/Versions/4.1/Resources/library/flexdashboard/rmarkdown/templates/flex_dashboard/resources/default.html --variable theme=cosmo --mathjax --variable 'mathjax-url=https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' --include-in-header /var/folders/pf/8_rzvpr95ybbr5n31grmh4dc0000gp/T//RtmpVJNnmp/rmarkdown-str3e6f3c6e76db.html --include-in-header /var/folders/pf/8_rzvpr95ybbr5n31grmh4dc0000gp/T//RtmpVJNnmp/file3e6f783d42dbhtml --highlight-style pygments --include-before-body /var/folders/pf/8_rzvpr95ybbr5n31grmh4dc0000gp/T//RtmpVJNnmp/file3e6f7df07588.html --include-after-body /var/folders/pf/8_rzvpr95ybbr5n31grmh4dc0000gp/T//RtmpVJNnmp/file3e6f35b47450.html 
#> 
  |                                                                                    
  |                                                                              |   0%
  |                                                                                    
  |...                                                                           |   3%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |.....                                                                         |   7%
#> label: custom2 (with options) 
#> List of 2
#>  $ echo  : logi FALSE
#>  $ engine: chr "css"
#> 
#> 
  |                                                                                    
  |........                                                                      |  10%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..........                                                                    |  13%
#> label: init (with options) 
#> List of 1
#>  $ include: logi FALSE
#> 
#> 
  |                                                                                    
  |.............                                                                 |  17%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |................                                                              |  20%
#> label: unnamed-chunk-1
#> 
  |                                                                                    
  |..................                                                            |  23%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |.....................                                                         |  27%
#> label: unnamed-chunk-2
#> 
  |                                                                                    
  |.......................                                                       |  30%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..........................                                                    |  33%
#> label: unnamed-chunk-3
#> 
  |                                                                                    
  |.............................                                                 |  37%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |...............................                                               |  40%
#> label: unnamed-chunk-4
#> 
  |                                                                                    
  |..................................                                            |  43%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |....................................                                          |  47%
#> label: unnamed-chunk-5
#> 
  |                                                                                    
  |.......................................                                       |  50%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..........................................                                    |  53%
#> label: unnamed-chunk-6
#> 
  |                                                                                    
  |............................................                                  |  57%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |...............................................                               |  60%
#> label: unnamed-chunk-7
#> 
  |                                                                                    
  |.................................................                             |  63%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |....................................................                          |  67%
#> label: unnamed-chunk-8
#> 
  |                                                                                    
  |.......................................................                       |  70%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |.........................................................                     |  73%
#> label: unnamed-chunk-9
#> 
  |                                                                                    
  |............................................................                  |  77%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..............................................................                |  80%
#> label: unnamed-chunk-10
#> 
  |                                                                                    
  |.................................................................             |  83%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |....................................................................          |  87%
#> label: unnamed-chunk-11
#> 
  |                                                                                    
  |......................................................................        |  90%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |.........................................................................     |  93%
#> label: unnamed-chunk-12
#> 
  |                                                                                    
  |...........................................................................   |  97%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..............................................................................| 100%
#> label: unnamed-chunk-13
#> 
#> /Applications/RStudio.app/Contents/MacOS/pandoc/pandoc +RTS -K512m -RTS Swap_template.knit.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output pandoc3e6f1c57f47a.html --lua-filter /Library/Frameworks/R.framework/Versions/4.1/Resources/library/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /Library/Frameworks/R.framework/Versions/4.1/Resources/library/rmarkdown/rmarkdown/lua/latex-div.lua --self-contained --variable bs3=TRUE --standalone --section-divs --template /Library/Frameworks/R.framework/Versions/4.1/Resources/library/flexdashboard/rmarkdown/templates/flex_dashboard/resources/default.html --variable theme=cosmo --mathjax --variable 'mathjax-url=https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' --include-in-header /var/folders/pf/8_rzvpr95ybbr5n31grmh4dc0000gp/T//RtmpVJNnmp/rmarkdown-str3e6f5a8c0145.html --include-in-header /var/folders/pf/8_rzvpr95ybbr5n31grmh4dc0000gp/T//RtmpVJNnmp/file3e6f1da78774html --highlight-style pygments --include-before-body /var/folders/pf/8_rzvpr95ybbr5n31grmh4dc0000gp/T//RtmpVJNnmp/file3e6f61addfe1.html --include-after-body /var/folders/pf/8_rzvpr95ybbr5n31grmh4dc0000gp/T//RtmpVJNnmp/file3e6f5e455ee0.html 
#> 
  |                                                                                    
  |                                                                              |   0%
  |                                                                                    
  |...                                                                           |   3%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |.....                                                                         |   7%
#> label: custom2 (with options) 
#> List of 2
#>  $ echo  : logi FALSE
#>  $ engine: chr "css"
#> 
#> 
  |                                                                                    
  |........                                                                      |  10%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..........                                                                    |  13%
#> label: init (with options) 
#> List of 1
#>  $ include: logi FALSE
#> 
#> 
  |                                                                                    
  |.............                                                                 |  17%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |................                                                              |  20%
#> label: unnamed-chunk-1
#> 
  |                                                                                    
  |..................                                                            |  23%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |.....................                                                         |  27%
#> label: unnamed-chunk-2
#> 
  |                                                                                    
  |.......................                                                       |  30%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..........................                                                    |  33%
#> label: unnamed-chunk-3
#> 
  |                                                                                    
  |.............................                                                 |  37%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |...............................                                               |  40%
#> label: unnamed-chunk-4
#> 
  |                                                                                    
  |..................................                                            |  43%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |....................................                                          |  47%
#> label: unnamed-chunk-5
#> 
  |                                                                                    
  |.......................................                                       |  50%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..........................................                                    |  53%
#> label: unnamed-chunk-6
#> 
  |                                                                                    
  |............................................                                  |  57%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |...............................................                               |  60%
#> label: unnamed-chunk-7
#> 
  |                                                                                    
  |.................................................                             |  63%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |....................................................                          |  67%
#> label: unnamed-chunk-8
#> 
  |                                                                                    
  |.......................................................                       |  70%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |.........................................................                     |  73%
#> label: unnamed-chunk-9
#> 
  |                                                                                    
  |............................................................                  |  77%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..............................................................                |  80%
#> label: unnamed-chunk-10
#> 
  |                                                                                    
  |.................................................................             |  83%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |....................................................................          |  87%
#> label: unnamed-chunk-11
#> 
  |                                                                                    
  |......................................................................        |  90%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |.........................................................................     |  93%
#> label: unnamed-chunk-12
#> 
  |                                                                                    
  |...........................................................................   |  97%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..............................................................................| 100%
#> label: unnamed-chunk-13
#> 
#> /Applications/RStudio.app/Contents/MacOS/pandoc/pandoc +RTS -K512m -RTS Swap_template.knit.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output pandoc3e6f5d5e2264.html --lua-filter /Library/Frameworks/R.framework/Versions/4.1/Resources/library/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /Library/Frameworks/R.framework/Versions/4.1/Resources/library/rmarkdown/rmarkdown/lua/latex-div.lua --self-contained --variable bs3=TRUE --standalone --section-divs --template /Library/Frameworks/R.framework/Versions/4.1/Resources/library/flexdashboard/rmarkdown/templates/flex_dashboard/resources/default.html --variable theme=cosmo --mathjax --variable 'mathjax-url=https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' --include-in-header /var/folders/pf/8_rzvpr95ybbr5n31grmh4dc0000gp/T//RtmpVJNnmp/rmarkdown-str3e6f57eee399.html --include-in-header /var/folders/pf/8_rzvpr95ybbr5n31grmh4dc0000gp/T//RtmpVJNnmp/file3e6f4a07ee9html --highlight-style pygments --include-before-body /var/folders/pf/8_rzvpr95ybbr5n31grmh4dc0000gp/T//RtmpVJNnmp/file3e6f44ebf55e.html --include-after-body /var/folders/pf/8_rzvpr95ybbr5n31grmh4dc0000gp/T//RtmpVJNnmp/file3e6f5f3a11ab.html 
#> 
  |                                                                                    
  |                                                                              |   0%
  |                                                                                    
  |...                                                                           |   3%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |.....                                                                         |   7%
#> label: custom2 (with options) 
#> List of 2
#>  $ echo  : logi FALSE
#>  $ engine: chr "css"
#> 
#> 
  |                                                                                    
  |........                                                                      |  10%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..........                                                                    |  13%
#> label: init (with options) 
#> List of 1
#>  $ include: logi FALSE
#> 
#> 
  |                                                                                    
  |.............                                                                 |  17%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |................                                                              |  20%
#> label: unnamed-chunk-1
#> 
  |                                                                                    
  |..................                                                            |  23%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |.....................                                                         |  27%
#> label: unnamed-chunk-2
#> 
  |                                                                                    
  |.......................                                                       |  30%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..........................                                                    |  33%
#> label: unnamed-chunk-3
#> 
  |                                                                                    
  |.............................                                                 |  37%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |...............................                                               |  40%
#> label: unnamed-chunk-4
#> 
  |                                                                                    
  |..................................                                            |  43%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |....................................                                          |  47%
#> label: unnamed-chunk-5
#> 
  |                                                                                    
  |.......................................                                       |  50%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..........................................                                    |  53%
#> label: unnamed-chunk-6
#> 
  |                                                                                    
  |............................................                                  |  57%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |...............................................                               |  60%
#> label: unnamed-chunk-7
#> 
  |                                                                                    
  |.................................................                             |  63%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |....................................................                          |  67%
#> label: unnamed-chunk-8
#> 
  |                                                                                    
  |.......................................................                       |  70%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |.........................................................                     |  73%
#> label: unnamed-chunk-9
#> 
  |                                                                                    
  |............................................................                  |  77%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..............................................................                |  80%
#> label: unnamed-chunk-10
#> 
  |                                                                                    
  |.................................................................             |  83%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |....................................................................          |  87%
#> label: unnamed-chunk-11
#> 
  |                                                                                    
  |......................................................................        |  90%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |.........................................................................     |  93%
#> label: unnamed-chunk-12
#> 
  |                                                                                    
  |...........................................................................   |  97%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..............................................................................| 100%
#> label: unnamed-chunk-13
#> 
#> /Applications/RStudio.app/Contents/MacOS/pandoc/pandoc +RTS -K512m -RTS Swap_template.knit.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output pandoc3e6f794f0b2f.html --lua-filter /Library/Frameworks/R.framework/Versions/4.1/Resources/library/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /Library/Frameworks/R.framework/Versions/4.1/Resources/library/rmarkdown/rmarkdown/lua/latex-div.lua --self-contained --variable bs3=TRUE --standalone --section-divs --template /Library/Frameworks/R.framework/Versions/4.1/Resources/library/flexdashboard/rmarkdown/templates/flex_dashboard/resources/default.html --variable theme=cosmo --mathjax --variable 'mathjax-url=https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' --include-in-header /var/folders/pf/8_rzvpr95ybbr5n31grmh4dc0000gp/T//RtmpVJNnmp/rmarkdown-str3e6f7c46b4cc.html --include-in-header /var/folders/pf/8_rzvpr95ybbr5n31grmh4dc0000gp/T//RtmpVJNnmp/file3e6f607fcd2html --highlight-style pygments --include-before-body /var/folders/pf/8_rzvpr95ybbr5n31grmh4dc0000gp/T//RtmpVJNnmp/file3e6f76674215.html --include-after-body /var/folders/pf/8_rzvpr95ybbr5n31grmh4dc0000gp/T//RtmpVJNnmp/file3e6f7523ad6d.html 
#> 
  |                                                                                    
  |                                                                              |   0%
  |                                                                                    
  |...                                                                           |   3%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |.....                                                                         |   7%
#> label: custom2 (with options) 
#> List of 2
#>  $ echo  : logi FALSE
#>  $ engine: chr "css"
#> 
#> 
  |                                                                                    
  |........                                                                      |  10%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..........                                                                    |  13%
#> label: init (with options) 
#> List of 1
#>  $ include: logi FALSE
#> 
#> 
  |                                                                                    
  |.............                                                                 |  17%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |................                                                              |  20%
#> label: unnamed-chunk-1
#> 
  |                                                                                    
  |..................                                                            |  23%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |.....................                                                         |  27%
#> label: unnamed-chunk-2
#> 
  |                                                                                    
  |.......................                                                       |  30%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..........................                                                    |  33%
#> label: unnamed-chunk-3
#> 
  |                                                                                    
  |.............................                                                 |  37%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |...............................                                               |  40%
#> label: unnamed-chunk-4
#> 
  |                                                                                    
  |..................................                                            |  43%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |....................................                                          |  47%
#> label: unnamed-chunk-5
#> 
  |                                                                                    
  |.......................................                                       |  50%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..........................................                                    |  53%
#> label: unnamed-chunk-6
#> 
  |                                                                                    
  |............................................                                  |  57%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |...............................................                               |  60%
#> label: unnamed-chunk-7
#> 
  |                                                                                    
  |.................................................                             |  63%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |....................................................                          |  67%
#> label: unnamed-chunk-8
#> 
  |                                                                                    
  |.......................................................                       |  70%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |.........................................................                     |  73%
#> label: unnamed-chunk-9
#> 
  |                                                                                    
  |............................................................                  |  77%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..............................................................                |  80%
#> label: unnamed-chunk-10
#> 
  |                                                                                    
  |.................................................................             |  83%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |....................................................................          |  87%
#> label: unnamed-chunk-11
#> 
  |                                                                                    
  |......................................................................        |  90%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |.........................................................................     |  93%
#> label: unnamed-chunk-12
#> 
  |                                                                                    
  |...........................................................................   |  97%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..............................................................................| 100%
#> label: unnamed-chunk-13
#> 
#> /Applications/RStudio.app/Contents/MacOS/pandoc/pandoc +RTS -K512m -RTS Swap_template.knit.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output pandoc3e6f3e736e4a.html --lua-filter /Library/Frameworks/R.framework/Versions/4.1/Resources/library/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /Library/Frameworks/R.framework/Versions/4.1/Resources/library/rmarkdown/rmarkdown/lua/latex-div.lua --self-contained --variable bs3=TRUE --standalone --section-divs --template /Library/Frameworks/R.framework/Versions/4.1/Resources/library/flexdashboard/rmarkdown/templates/flex_dashboard/resources/default.html --variable theme=cosmo --mathjax --variable 'mathjax-url=https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' --include-in-header /var/folders/pf/8_rzvpr95ybbr5n31grmh4dc0000gp/T//RtmpVJNnmp/rmarkdown-str3e6f4c7cfebc.html --include-in-header /var/folders/pf/8_rzvpr95ybbr5n31grmh4dc0000gp/T//RtmpVJNnmp/file3e6f22380fdfhtml --highlight-style pygments --include-before-body /var/folders/pf/8_rzvpr95ybbr5n31grmh4dc0000gp/T//RtmpVJNnmp/file3e6fe9a0b06.html --include-after-body /var/folders/pf/8_rzvpr95ybbr5n31grmh4dc0000gp/T//RtmpVJNnmp/file3e6f2349be67.html 
#> 
  |                                                                                    
  |                                                                              |   0%
  |                                                                                    
  |...                                                                           |   3%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |.....                                                                         |   7%
#> label: custom2 (with options) 
#> List of 2
#>  $ echo  : logi FALSE
#>  $ engine: chr "css"
#> 
#> 
  |                                                                                    
  |........                                                                      |  10%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..........                                                                    |  13%
#> label: init (with options) 
#> List of 1
#>  $ include: logi FALSE
#> 
#> 
  |                                                                                    
  |.............                                                                 |  17%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |................                                                              |  20%
#> label: unnamed-chunk-1
#> 
  |                                                                                    
  |..................                                                            |  23%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |.....................                                                         |  27%
#> label: unnamed-chunk-2
#> 
  |                                                                                    
  |.......................                                                       |  30%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..........................                                                    |  33%
#> label: unnamed-chunk-3
#> 
  |                                                                                    
  |.............................                                                 |  37%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |...............................                                               |  40%
#> label: unnamed-chunk-4
#> 
  |                                                                                    
  |..................................                                            |  43%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |....................................                                          |  47%
#> label: unnamed-chunk-5
#> 
  |                                                                                    
  |.......................................                                       |  50%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..........................................                                    |  53%
#> label: unnamed-chunk-6
#> 
  |                                                                                    
  |............................................                                  |  57%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |...............................................                               |  60%
#> label: unnamed-chunk-7
#> 
  |                                                                                    
  |.................................................                             |  63%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |....................................................                          |  67%
#> label: unnamed-chunk-8
#> 
  |                                                                                    
  |.......................................................                       |  70%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |.........................................................                     |  73%
#> label: unnamed-chunk-9
#> 
  |                                                                                    
  |............................................................                  |  77%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..............................................................                |  80%
#> label: unnamed-chunk-10
#> 
  |                                                                                    
  |.................................................................             |  83%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |....................................................................          |  87%
#> label: unnamed-chunk-11
#> 
  |                                                                                    
  |......................................................................        |  90%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |.........................................................................     |  93%
#> label: unnamed-chunk-12
#> 
  |                                                                                    
  |...........................................................................   |  97%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..............................................................................| 100%
#> label: unnamed-chunk-13
#> 
#> /Applications/RStudio.app/Contents/MacOS/pandoc/pandoc +RTS -K512m -RTS Swap_template.knit.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output pandoc3e6f72fbaeb8.html --lua-filter /Library/Frameworks/R.framework/Versions/4.1/Resources/library/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /Library/Frameworks/R.framework/Versions/4.1/Resources/library/rmarkdown/rmarkdown/lua/latex-div.lua --self-contained --variable bs3=TRUE --standalone --section-divs --template /Library/Frameworks/R.framework/Versions/4.1/Resources/library/flexdashboard/rmarkdown/templates/flex_dashboard/resources/default.html --variable theme=cosmo --mathjax --variable 'mathjax-url=https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' --include-in-header /var/folders/pf/8_rzvpr95ybbr5n31grmh4dc0000gp/T//RtmpVJNnmp/rmarkdown-str3e6f21881c93.html --include-in-header /var/folders/pf/8_rzvpr95ybbr5n31grmh4dc0000gp/T//RtmpVJNnmp/file3e6f6f0c0817html --highlight-style pygments --include-before-body /var/folders/pf/8_rzvpr95ybbr5n31grmh4dc0000gp/T//RtmpVJNnmp/file3e6f7ee756f5.html --include-after-body /var/folders/pf/8_rzvpr95ybbr5n31grmh4dc0000gp/T//RtmpVJNnmp/file3e6f5fe2fea.html 
#> 
  |                                                                                    
  |                                                                              |   0%
  |                                                                                    
  |...                                                                           |   3%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |.....                                                                         |   7%
#> label: custom2 (with options) 
#> List of 2
#>  $ echo  : logi FALSE
#>  $ engine: chr "css"
#> 
#> 
  |                                                                                    
  |........                                                                      |  10%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..........                                                                    |  13%
#> label: init (with options) 
#> List of 1
#>  $ include: logi FALSE
#> 
#> 
  |                                                                                    
  |.............                                                                 |  17%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |................                                                              |  20%
#> label: unnamed-chunk-1
#> 
  |                                                                                    
  |..................                                                            |  23%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |.....................                                                         |  27%
#> label: unnamed-chunk-2
#> 
  |                                                                                    
  |.......................                                                       |  30%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..........................                                                    |  33%
#> label: unnamed-chunk-3
#> 
  |                                                                                    
  |.............................                                                 |  37%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |...............................                                               |  40%
#> label: unnamed-chunk-4
#> 
  |                                                                                    
  |..................................                                            |  43%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |....................................                                          |  47%
#> label: unnamed-chunk-5
#> 
  |                                                                                    
  |.......................................                                       |  50%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..........................................                                    |  53%
#> label: unnamed-chunk-6
#> 
  |                                                                                    
  |............................................                                  |  57%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |...............................................                               |  60%
#> label: unnamed-chunk-7
#> 
  |                                                                                    
  |.................................................                             |  63%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |....................................................                          |  67%
#> label: unnamed-chunk-8
#> 
  |                                                                                    
  |.......................................................                       |  70%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |.........................................................                     |  73%
#> label: unnamed-chunk-9
#> 
  |                                                                                    
  |............................................................                  |  77%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..............................................................                |  80%
#> label: unnamed-chunk-10
#> 
  |                                                                                    
  |.................................................................             |  83%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |....................................................................          |  87%
#> label: unnamed-chunk-11
#> 
  |                                                                                    
  |......................................................................        |  90%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |.........................................................................     |  93%
#> label: unnamed-chunk-12
#> 
  |                                                                                    
  |...........................................................................   |  97%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..............................................................................| 100%
#> label: unnamed-chunk-13
#> 
#> /Applications/RStudio.app/Contents/MacOS/pandoc/pandoc +RTS -K512m -RTS Swap_template.knit.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output pandoc3e6f5743ff32.html --lua-filter /Library/Frameworks/R.framework/Versions/4.1/Resources/library/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /Library/Frameworks/R.framework/Versions/4.1/Resources/library/rmarkdown/rmarkdown/lua/latex-div.lua --self-contained --variable bs3=TRUE --standalone --section-divs --template /Library/Frameworks/R.framework/Versions/4.1/Resources/library/flexdashboard/rmarkdown/templates/flex_dashboard/resources/default.html --variable theme=cosmo --mathjax --variable 'mathjax-url=https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' --include-in-header /var/folders/pf/8_rzvpr95ybbr5n31grmh4dc0000gp/T//RtmpVJNnmp/rmarkdown-str3e6f655938a9.html --include-in-header /var/folders/pf/8_rzvpr95ybbr5n31grmh4dc0000gp/T//RtmpVJNnmp/file3e6f4497133ahtml --highlight-style pygments --include-before-body /var/folders/pf/8_rzvpr95ybbr5n31grmh4dc0000gp/T//RtmpVJNnmp/file3e6f1a6f6804.html --include-after-body /var/folders/pf/8_rzvpr95ybbr5n31grmh4dc0000gp/T//RtmpVJNnmp/file3e6f815ec2b.html 
#> 
  |                                                                                    
  |                                                                              |   0%
  |                                                                                    
  |...                                                                           |   3%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |.....                                                                         |   7%
#> label: custom2 (with options) 
#> List of 2
#>  $ echo  : logi FALSE
#>  $ engine: chr "css"
#> 
#> 
  |                                                                                    
  |........                                                                      |  10%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..........                                                                    |  13%
#> label: init (with options) 
#> List of 1
#>  $ include: logi FALSE
#> 
#> 
  |                                                                                    
  |.............                                                                 |  17%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |................                                                              |  20%
#> label: unnamed-chunk-1
#> 
  |                                                                                    
  |..................                                                            |  23%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |.....................                                                         |  27%
#> label: unnamed-chunk-2
#> 
  |                                                                                    
  |.......................                                                       |  30%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..........................                                                    |  33%
#> label: unnamed-chunk-3
#> 
  |                                                                                    
  |.............................                                                 |  37%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |...............................                                               |  40%
#> label: unnamed-chunk-4
#> 
  |                                                                                    
  |..................................                                            |  43%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |....................................                                          |  47%
#> label: unnamed-chunk-5
#> 
  |                                                                                    
  |.......................................                                       |  50%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..........................................                                    |  53%
#> label: unnamed-chunk-6
#> 
  |                                                                                    
  |............................................                                  |  57%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |...............................................                               |  60%
#> label: unnamed-chunk-7
#> 
  |                                                                                    
  |.................................................                             |  63%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |....................................................                          |  67%
#> label: unnamed-chunk-8
#> 
  |                                                                                    
  |.......................................................                       |  70%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |.........................................................                     |  73%
#> label: unnamed-chunk-9
#> 
  |                                                                                    
  |............................................................                  |  77%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..............................................................                |  80%
#> label: unnamed-chunk-10
#> 
  |                                                                                    
  |.................................................................             |  83%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |....................................................................          |  87%
#> label: unnamed-chunk-11
#> 
  |                                                                                    
  |......................................................................        |  90%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |.........................................................................     |  93%
#> label: unnamed-chunk-12
#> 
  |                                                                                    
  |...........................................................................   |  97%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..............................................................................| 100%
#> label: unnamed-chunk-13
#> 
#> /Applications/RStudio.app/Contents/MacOS/pandoc/pandoc +RTS -K512m -RTS Swap_template.knit.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output pandoc3e6f3fee1cd2.html --lua-filter /Library/Frameworks/R.framework/Versions/4.1/Resources/library/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /Library/Frameworks/R.framework/Versions/4.1/Resources/library/rmarkdown/rmarkdown/lua/latex-div.lua --self-contained --variable bs3=TRUE --standalone --section-divs --template /Library/Frameworks/R.framework/Versions/4.1/Resources/library/flexdashboard/rmarkdown/templates/flex_dashboard/resources/default.html --variable theme=cosmo --mathjax --variable 'mathjax-url=https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' --include-in-header /var/folders/pf/8_rzvpr95ybbr5n31grmh4dc0000gp/T//RtmpVJNnmp/rmarkdown-str3e6f57892d25.html --include-in-header /var/folders/pf/8_rzvpr95ybbr5n31grmh4dc0000gp/T//RtmpVJNnmp/file3e6f6ef30508html --highlight-style pygments --include-before-body /var/folders/pf/8_rzvpr95ybbr5n31grmh4dc0000gp/T//RtmpVJNnmp/file3e6f14cf8920.html --include-after-body /var/folders/pf/8_rzvpr95ybbr5n31grmh4dc0000gp/T//RtmpVJNnmp/file3e6f45339e8c.html 
#> 
  |                                                                                    
  |                                                                              |   0%
  |                                                                                    
  |...                                                                           |   3%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |.....                                                                         |   7%
#> label: custom2 (with options) 
#> List of 2
#>  $ echo  : logi FALSE
#>  $ engine: chr "css"
#> 
#> 
  |                                                                                    
  |........                                                                      |  10%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..........                                                                    |  13%
#> label: init (with options) 
#> List of 1
#>  $ include: logi FALSE
#> 
#> 
  |                                                                                    
  |.............                                                                 |  17%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |................                                                              |  20%
#> label: unnamed-chunk-1
#> 
  |                                                                                    
  |..................                                                            |  23%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |.....................                                                         |  27%
#> label: unnamed-chunk-2
#> 
  |                                                                                    
  |.......................                                                       |  30%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..........................                                                    |  33%
#> label: unnamed-chunk-3
#> 
  |                                                                                    
  |.............................                                                 |  37%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |...............................                                               |  40%
#> label: unnamed-chunk-4
#> 
  |                                                                                    
  |..................................                                            |  43%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |....................................                                          |  47%
#> label: unnamed-chunk-5
#> 
  |                                                                                    
  |.......................................                                       |  50%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..........................................                                    |  53%
#> label: unnamed-chunk-6
#> 
  |                                                                                    
  |............................................                                  |  57%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |...............................................                               |  60%
#> label: unnamed-chunk-7
#> 
  |                                                                                    
  |.................................................                             |  63%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |....................................................                          |  67%
#> label: unnamed-chunk-8
#> 
  |                                                                                    
  |.......................................................                       |  70%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |.........................................................                     |  73%
#> label: unnamed-chunk-9
#> 
  |                                                                                    
  |............................................................                  |  77%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..............................................................                |  80%
#> label: unnamed-chunk-10
#> 
  |                                                                                    
  |.................................................................             |  83%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |....................................................................          |  87%
#> label: unnamed-chunk-11
#> 
  |                                                                                    
  |......................................................................        |  90%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |.........................................................................     |  93%
#> label: unnamed-chunk-12
#> 
  |                                                                                    
  |...........................................................................   |  97%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..............................................................................| 100%
#> label: unnamed-chunk-13
#> 
#> /Applications/RStudio.app/Contents/MacOS/pandoc/pandoc +RTS -K512m -RTS Swap_template.knit.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output pandoc3e6f436e18c1.html --lua-filter /Library/Frameworks/R.framework/Versions/4.1/Resources/library/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /Library/Frameworks/R.framework/Versions/4.1/Resources/library/rmarkdown/rmarkdown/lua/latex-div.lua --self-contained --variable bs3=TRUE --standalone --section-divs --template /Library/Frameworks/R.framework/Versions/4.1/Resources/library/flexdashboard/rmarkdown/templates/flex_dashboard/resources/default.html --variable theme=cosmo --mathjax --variable 'mathjax-url=https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' --include-in-header /var/folders/pf/8_rzvpr95ybbr5n31grmh4dc0000gp/T//RtmpVJNnmp/rmarkdown-str3e6f7250460.html --include-in-header /var/folders/pf/8_rzvpr95ybbr5n31grmh4dc0000gp/T//RtmpVJNnmp/file3e6ff423e4ahtml --highlight-style pygments --include-before-body /var/folders/pf/8_rzvpr95ybbr5n31grmh4dc0000gp/T//RtmpVJNnmp/file3e6f46077419.html --include-after-body /var/folders/pf/8_rzvpr95ybbr5n31grmh4dc0000gp/T//RtmpVJNnmp/file3e6f1357393a.html 
#> 
  |                                                                                    
  |                                                                              |   0%
  |                                                                                    
  |...                                                                           |   3%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |.....                                                                         |   7%
#> label: custom2 (with options) 
#> List of 2
#>  $ echo  : logi FALSE
#>  $ engine: chr "css"
#> 
#> 
  |                                                                                    
  |........                                                                      |  10%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..........                                                                    |  13%
#> label: init (with options) 
#> List of 1
#>  $ include: logi FALSE
#> 
#> 
  |                                                                                    
  |.............                                                                 |  17%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |................                                                              |  20%
#> label: unnamed-chunk-1
#> 
  |                                                                                    
  |..................                                                            |  23%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |.....................                                                         |  27%
#> label: unnamed-chunk-2
#> 
  |                                                                                    
  |.......................                                                       |  30%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..........................                                                    |  33%
#> label: unnamed-chunk-3
#> 
  |                                                                                    
  |.............................                                                 |  37%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |...............................                                               |  40%
#> label: unnamed-chunk-4
#> 
  |                                                                                    
  |..................................                                            |  43%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |....................................                                          |  47%
#> label: unnamed-chunk-5
#> 
  |                                                                                    
  |.......................................                                       |  50%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..........................................                                    |  53%
#> label: unnamed-chunk-6
#> 
  |                                                                                    
  |............................................                                  |  57%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |...............................................                               |  60%
#> label: unnamed-chunk-7
#> 
  |                                                                                    
  |.................................................                             |  63%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |....................................................                          |  67%
#> label: unnamed-chunk-8
#> 
  |                                                                                    
  |.......................................................                       |  70%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |.........................................................                     |  73%
#> label: unnamed-chunk-9
#> 
  |                                                                                    
  |............................................................                  |  77%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..............................................................                |  80%
#> label: unnamed-chunk-10
#> 
  |                                                                                    
  |.................................................................             |  83%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |....................................................................          |  87%
#> label: unnamed-chunk-11
#> 
  |                                                                                    
  |......................................................................        |  90%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |.........................................................................     |  93%
#> label: unnamed-chunk-12
#> 
  |                                                                                    
  |...........................................................................   |  97%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..............................................................................| 100%
#> label: unnamed-chunk-13
#> 
#> /Applications/RStudio.app/Contents/MacOS/pandoc/pandoc +RTS -K512m -RTS Swap_template.knit.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output pandoc3e6f47674473.html --lua-filter /Library/Frameworks/R.framework/Versions/4.1/Resources/library/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /Library/Frameworks/R.framework/Versions/4.1/Resources/library/rmarkdown/rmarkdown/lua/latex-div.lua --self-contained --variable bs3=TRUE --standalone --section-divs --template /Library/Frameworks/R.framework/Versions/4.1/Resources/library/flexdashboard/rmarkdown/templates/flex_dashboard/resources/default.html --variable theme=cosmo --mathjax --variable 'mathjax-url=https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' --include-in-header /var/folders/pf/8_rzvpr95ybbr5n31grmh4dc0000gp/T//RtmpVJNnmp/rmarkdown-str3e6f262cff16.html --include-in-header /var/folders/pf/8_rzvpr95ybbr5n31grmh4dc0000gp/T//RtmpVJNnmp/file3e6f541f10eehtml --highlight-style pygments --include-before-body /var/folders/pf/8_rzvpr95ybbr5n31grmh4dc0000gp/T//RtmpVJNnmp/file3e6f4390a467.html --include-after-body /var/folders/pf/8_rzvpr95ybbr5n31grmh4dc0000gp/T//RtmpVJNnmp/file3e6f4d1988d8.html 
#> 
  |                                                                                    
  |                                                                              |   0%
  |                                                                                    
  |...                                                                           |   3%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |.....                                                                         |   7%
#> label: custom2 (with options) 
#> List of 2
#>  $ echo  : logi FALSE
#>  $ engine: chr "css"
#> 
#> 
  |                                                                                    
  |........                                                                      |  10%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..........                                                                    |  13%
#> label: init (with options) 
#> List of 1
#>  $ include: logi FALSE
#> 
#> 
  |                                                                                    
  |.............                                                                 |  17%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |................                                                              |  20%
#> label: unnamed-chunk-1
#> 
  |                                                                                    
  |..................                                                            |  23%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |.....................                                                         |  27%
#> label: unnamed-chunk-2
#> 
  |                                                                                    
  |.......................                                                       |  30%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..........................                                                    |  33%
#> label: unnamed-chunk-3
#> 
  |                                                                                    
  |.............................                                                 |  37%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |...............................                                               |  40%
#> label: unnamed-chunk-4
#> 
  |                                                                                    
  |..................................                                            |  43%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |....................................                                          |  47%
#> label: unnamed-chunk-5
#> 
  |                                                                                    
  |.......................................                                       |  50%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..........................................                                    |  53%
#> label: unnamed-chunk-6
#> 
  |                                                                                    
  |............................................                                  |  57%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |...............................................                               |  60%
#> label: unnamed-chunk-7
#> 
  |                                                                                    
  |.................................................                             |  63%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |....................................................                          |  67%
#> label: unnamed-chunk-8
#> 
  |                                                                                    
  |.......................................................                       |  70%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |.........................................................                     |  73%
#> label: unnamed-chunk-9
#> 
  |                                                                                    
  |............................................................                  |  77%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..............................................................                |  80%
#> label: unnamed-chunk-10
#> 
  |                                                                                    
  |.................................................................             |  83%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |....................................................................          |  87%
#> label: unnamed-chunk-11
#> 
  |                                                                                    
  |......................................................................        |  90%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |.........................................................................     |  93%
#> label: unnamed-chunk-12
#> 
  |                                                                                    
  |...........................................................................   |  97%
#>   ordinary text without R code
#> 
#> 
  |                                                                                    
  |..............................................................................| 100%
#> label: unnamed-chunk-13
#> 
#> /Applications/RStudio.app/Contents/MacOS/pandoc/pandoc +RTS -K512m -RTS Swap_template.knit.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output pandoc3e6f415dcbec.html --lua-filter /Library/Frameworks/R.framework/Versions/4.1/Resources/library/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /Library/Frameworks/R.framework/Versions/4.1/Resources/library/rmarkdown/rmarkdown/lua/latex-div.lua --self-contained --variable bs3=TRUE --standalone --section-divs --template /Library/Frameworks/R.framework/Versions/4.1/Resources/library/flexdashboard/rmarkdown/templates/flex_dashboard/resources/default.html --variable theme=cosmo --mathjax --variable 'mathjax-url=https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' --include-in-header /var/folders/pf/8_rzvpr95ybbr5n31grmh4dc0000gp/T//RtmpVJNnmp/rmarkdown-str3e6f244a55ba.html --include-in-header /var/folders/pf/8_rzvpr95ybbr5n31grmh4dc0000gp/T//RtmpVJNnmp/file3e6fc4238f3html --highlight-style pygments --include-before-body /var/folders/pf/8_rzvpr95ybbr5n31grmh4dc0000gp/T//RtmpVJNnmp/file3e6f4fa8dfce.html --include-after-body /var/folders/pf/8_rzvpr95ybbr5n31grmh4dc0000gp/T//RtmpVJNnmp/file3e6f57fd763d.html

Karura Swap Performance Summary

Active Users
Swap Trades
Trades Per User
Trading Volume
Count U_Growth U_Trend S_Growth S_Trend TPU_Growth TPU_Trend V_Growth V_Trend
ALL 29857 0.81 0.86 0.59 0.6
KSM:KUSD 6912 0.6 1.11 0.71 0.89
KAR:KSM 5880 1.65 1.25 0.55 1.4
KUSD:LKSM 3462 1.22 1.3 0.77 0.93
KAR:KUSD 2904 0.97 1.01 0.9 0.77
KAR:LKSM 2562 0.57 1.48 0.62 2.08
KSM:LKSM 2071 0.67 0.69 0.6 0.62
KSM:RMRK 1719 0.66 0.32 0.76 0.34
KUSD:RMRK 1215 0.99 0.34 0.7 0.28
BNC:KUSD 981 0.88 0.79 0.31 0.85
KBTC:KUSD 482 1.56 0.87 0.86 1.26
KAR:QTZ 459 0.73 0.48 0.79 0.41
KUSD:QTZ 459 0.73 0.48 0.79 0.41
KUSD:PHA 372 0.78 0.5 1.17 0.33
KINT:KUSD 290 0.84 1.13 0.86 0.96
TAI:taiKSM 89 0.29 0.17 0.57 0.05

Last updated: 2022-05-18 07:30:47

Date range of data: 2022-05-04T00:03:30.343 to 2022-05-17T23:56:00.193.

Sources:

Swaps:

Loans:

---
title: "Acala / Karura Dashboards"
output:
  flexdashboard::flex_dashboard:
    orientation: rows
    vertical_layout: scroll
    social: menu
    source_code: embed
params:
  network: Karura
  window: 14
---

```{css custom1, echo=FALSE}
.dataTables_scrollBody {
    max-height: 100% !important;
}
```

```{r global, include=FALSE}

knitr::opts_chunk$set(
  message = FALSE,
  warning = FALSE,
  comment = "#>"
)

library(kableExtra)
library(formattable)
library(lubridate)
library(flexdashboard)
library(DT)

# Helper function to concat
`%+%` <- function(a, b) paste0(a, b)

# tokens <- rbind(c("ACA", "Acala", 12),
#                 c("AUSD","Acala Dollar", 12),
#                 c("taiKSM","Taiga KSM", 12),
#                 c("RMRK","RMRK", 10),
#                 c("DOT","Polkadot", 10),
#                 c("LCDOT","Liquid Crowdloan DOT", 10),
#                 c("LDOT","Liquid DOT", 10),
#                 c("RENBTC","Ren Protocol BTC", 8),
#                 c("CASH","Compound CASH", 8),
#                 c("KAR","Karura", 12),
#                 c("KUSD","Karura Dollar", 12),
#                 c("KSM","Kusama", 12),
#                 c("LKSM","Liquid KSM", 12),
#                 c("TAI","Taiga", 12),
#                 c("BNC","Bifrost Asgard", 12),
#                 c("VSKSM","Bifrost Voucher Slot KSM", 12),
#                 c("PHA","Phala Native Token", 12),
#                 c("KINT","Kintsugi Native Token", 12),
#                 c("KBTC","Kintsugi Wrapped BTC", 8)) %>%
#   as.data.table %>%
#   setnames(c("Token","Name","decimals"))


# remotes::install_github("ropensci/ghql") # if package is not already installed
library(jsonlite)
library(data.table)
library(ghql)
x <- GraphqlClient$new()


window <- params$window
endpoint <- params$endpoint
network <- params$network

if (network == 'Acala') {
  
  dex_endpoint <- "https://api.subquery.network/sq/AcalaNetwork/acala-dex"
  loan_endpoint <- "https://api.subquery.network/sq/AcalaNetwork/acala-loan"
  swap_endpoint <- "https://api.subquery.network/sq/AcalaNetwork/acala-swap-day-data"
  official_endpoint <- "https://api.subquery.network/sq/AcalaNetwork/acala"
  
} else {

  dex_endpoint <- "https://api.subquery.network/sq/AcalaNetwork/karura-dex"
  loan_endpoint <- "https://api.subquery.network/sq/AcalaNetwork/karura-loan"
  swap_endpoint <- "https://api.subquery.network/sq/AcalaNetwork/karura-test"
  official_endpoint <- "https://api.subquery.network/sq/AcalaNetwork/karura"

}

getSwaps <- function(endpoint, window) {
  # endpoint <- official_endpoint; window <- 10
  
  # make a client
  cli <- GraphqlClient$new(url = endpoint)
  mindate <- today(tzone = 'UTC') - window
  
  cursor <- ''
  resList <- list()
  for (i in 1:1000) {
    if (cursor == '') {
      cursorStr <- 'first:100'
    } else {
      cursorStr <- 'first:100 after:"' %+% cursor %+% '"'
    }
    qry <- Query$new()
    qry$query('dexActions', '
    {
      query {
        dexActions (filter: {timestamp: {greaterThanOrEqualTo: "' %+% mindate %+% '"}, type: {equalTo: "swap"}} ' %+% cursorStr %+% ') {
          totalCount
          edges {
            node { timestamp id accountId token0Id token1Id  volumeUSD data
            }
            cursor
          }
          pageInfo {
            endCursor
            hasNextPage
          }
        }
      }
    }')
    result <- cli$exec(qry$queries$dexActions)  %>%
      fromJSON(flatten=TRUE)
    cursor <- result$data$query$dexActions$pageInfo$endCursor
    res <- as.data.table(result$data$query$dexActions$edges)
    res[, cursor := NULL]
    
    print(i %+% " " %+% nrow(res))
    resList[[i]] <- res
    if (result$data$query$dexActions$pageInfo$hasNextPage == FALSE) break
  }
  res <- rbindlist(resList)
  setnames(res, old = names(res), new = gsub("node.", "", names(res)))
  
  if (substr(max(res$timestamp), 12, 13) < 23) {
    maxdate <- as.Date(max(res$timestamp))-1
  } else {
    maxdate <- as.Date(max(res$timestamp))
  }
  
  res <- res[timestamp <= maxdate]
  res[, date := as.Date(timestamp)]
  setorder(res, timestamp)
  
  # Replace foreign assets
  res[, token0Id := subscanr::fixToken(token0Id)]
  res[, token1Id := subscanr::fixToken(token1Id)]

  # Normalize pairs
  res[, pair := paste0(token0Id %+% ":" %+% token1Id)]
  res[token1Id < token0Id, pair := paste0(token1Id %+% ":" %+% token0Id)]
  res[, exclude := token0Id == token1Id]
  res  
  
}

getDailyPoolsQuery <- function(endpoint, window) {
  # endpoint <- dex_endpoint; window <- 40
  
  # make a client
  cli <- GraphqlClient$new(url = endpoint)
  mindate <- today(tzone = 'UTC') - window
  
  cursor <- ''
  resList <- list()
  for (i in 1:1000) {
    if (cursor == '') {
      cursorStr <- 'first:100'
    } else {
      cursorStr <- 'first:100 after:"' %+% cursor %+% '"'
    }
    qry <- Query$new()
    qry$query('dailyPools', '
      {
        query {
          dailyPools (filter: {timestamp: {greaterThanOrEqualTo: "' %+% mindate %+% '"}} ' %+% cursorStr %+% ') {
            totalCount
            edges {
              node { 
                timestamp token0 {id} token1 {id} feeRateUSD dailyTradeVolumeUSD totalTVL txCount
              }
              cursor
            }
            pageInfo {
              endCursor
              hasNextPage
            }
          }
        }
      }')
      result <- cli$exec(qry$queries$dailyPools)  %>%
        fromJSON(flatten=TRUE)
    
      cursor <- result$data$query$dailyPools$pageInfo$endCursor
      res <- as.data.table(result$data$query$dailyPools$edges)
      res[, cursor := NULL]
      
      print(i %+% " " %+% nrow(res))
      resList[[i]] <- res
      if (result$data$query$dailyPools$pageInfo$hasNextPage == FALSE) break
  }
  res <- rbindlist(resList)
  setnames(res, old = names(res), new = gsub("node.", "", names(res)))
  res[, date := as.Date(timestamp)]
  setorder(res, date)
  setnames(res, 
           c("token0.id","token1.id","dailyTradeVolumeUSD","totalTVL","feeRateUSD"), 
           c("token0Id", "token1Id", "volumeUSD", "tvlUSD", "feeUSD"))

  # Replace foreign assets
  res[, token0Id := subscanr::fixToken(token0Id)]
  res[, token1Id := subscanr::fixToken(token1Id)]

  # Normalize pairs
  res[, pair := paste0(token0Id %+% ":" %+% token1Id)]
  res[token1Id < token0Id, pair := paste0(token1Id %+% ":" %+% token0Id)]
  
  res[, feeUSD := as.numeric(feeUSD) / 1e18]
  res[, volumeUSD := as.numeric(volumeUSD) / 1e18]
  res[, tvlUSD := as.numeric(tvlUSD) / 1e18]
  
  res  
  
}


liquidityQuery <- function(endpoint, window) {
  method <- 'dexActions'; maxn <- 1000

  cli <- GraphqlClient$new(url = endpoint)
  mindate <- today(tzone = 'UTC') - window
  
  cursor <- ''
  resList <- list()
  for (i in 1:maxn) {
    if (cursor == '') {
      cursorStr <- 'first:100'
    } else {
      cursorStr <- 'first:100 after:"' %+% cursor %+% '"'
    }
    qry <- Query$new()
    qry$query(method, '
      {
        query {
          ' %+% method %+% ' (filter: {timestamp: {greaterThanOrEqualTo: "' %+% mindate %+% '"}, type: {in: ["addLiquidity","removeLiquidity"]}} ' %+% cursorStr %+% ') {
            totalCount
            edges {
              node { timestamp id nodeId accountId type token0Id token1Id token0Amount token1Amount volumeUSD
              }
              cursor
            }
            pageInfo {
              endCursor
              hasNextPage
            }
          }
        }
      }')
    result <- cli$exec(qry$queries[[method]])  %>%
      fromJSON(flatten=TRUE)
    cursor <- result$data$query[[method]]$pageInfo$endCursor
    res <- as.data.table(result$data$query[[method]]$edges)
    res[, cursor := NULL]
    
    print(i %+% " " %+% nrow(res))
    resList[[i]] <- res
    if (result$data$query[[method]]$pageInfo$hasNextPage == FALSE) break
  }
  res <- rbindlist(resList) %>% 
    setnames(names(res), gsub("node.", "", names(res)))
  res[, date := as.Date(timestamp)]
  setorder(res, date)
  
  # Replace foreign assets
  res[, token0Id := subscanr::fixToken(token0Id)]
  res[, token1Id := subscanr::fixToken(token1Id)]

  # Normalize pairs
  res[, pair := paste0(token0Id %+% ":" %+% token1Id)]
  res[token1Id < token0Id, pair := paste0(token1Id %+% ":" %+% token0Id)]
  res  
  
}

getLoansCollateralParamsQuery <- function(endpoint) {
  method <- 'collateralParams'; maxn <- 1000
  
  cli <- GraphqlClient$new(url = endpoint)

  qry <- Query$new()
  qry$query(method, '
    {
      query {
     	collateralParams {
          totalCount
            nodes { 
							collateral {
							  id
							} maximumTotalDebitValue interestRatePerSec liquidationRatio 
              liquidationPenalty requiredCollateralRatio 
          }
        }
      }
    }')
  result <- cli$exec(qry$queries[[method]])  %>%
    fromJSON(flatten=TRUE)
  res <- as.data.table(result$data$query[[method]]$nodes)

  # Replace foreign assets
  res[, collateral.id := subscanr::fixToken(collateral.id)]
  res <- merge(res, subscanr::tokens, by.x='collateral.id', by.y='Token')

  res[, adj := as.numeric(substr(as.character(1e20),1, as.numeric(decimals) + 1))]
  res[, maximumTotalDebitValue := as.numeric(maximumTotalDebitValue) / as.numeric(adj)]  
  res[, liquidationRatio := as.numeric(liquidationRatio) / 1e18]  
  res[, liquidationPenalty := as.numeric(liquidationPenalty) / 1e18]  
  res[, requiredCollateralRatio := as.numeric(requiredCollateralRatio) / 1e18]  
  res[, APR := (as.numeric(interestRatePerSec) / 1e18 + 1) ** (365 * 86400) - 1]
  res

}

getLoansDailyPositionsQuery <- function(endpoint, window) {
  # endpoint <-loan_endpoint
  method <- 'dailyPositions'; maxn <- 1000

  cli <- GraphqlClient$new(url = endpoint)
  mindate <- today(tzone = 'UTC') - window
  
  cursor <- ''
  resList <- list()
  for (i in 1:maxn) {
    if (cursor == '') {
      cursorStr <- 'first:100'
    } else {
      cursorStr <- 'first:100 after:"' %+% cursor %+% '"'
    }
    qry <- Query$new()
    qry$query(method, '
      {
        query {
          ' %+% method %+% ' (filter: {timestamp: {greaterThanOrEqualTo: "' %+% mindate %+% '"}} ' %+% cursorStr %+% ') {
            totalCount
            edges {
              node { 
               id owner {id} collateral {id} depositAmount debitAmount depositVolumeUSD debitVolumeUSD 
               depositChangedUSD debitChangedUSD debitExchangeRate timestamp txCount
              }
              cursor
            }
            pageInfo {
              endCursor
              hasNextPage
            }
          }
        }
      }')
    result <- cli$exec(qry$queries[[method]])  %>%
      fromJSON(flatten=TRUE)
    cursor <- result$data$query[[method]]$pageInfo$endCursor
    res <- as.data.table(result$data$query[[method]]$edges)
    res[, cursor := NULL]
    
    print(i %+% " " %+% nrow(res))
    resList[[i]] <- res
    if (result$data$query[[method]]$pageInfo$hasNextPage == FALSE) break
  }
  res <- rbindlist(resList) %>% 
    setnames(names(res), gsub("node.", "", names(res)))
  res[, Date := as.Date(timestamp)]
  res[, collateral.id := subscanr::fixToken(collateral.id)]
  res <- merge(res, subscanr::tokens, by.x='collateral.id', by.y='Token')

  res[, adj := as.numeric(substr(as.character(1e20),1, as.numeric(decimals) + 1))]
  res[, depositAmount := as.numeric(depositAmount) / adj]
  res[, debitAmount := as.numeric(debitAmount) / adj]

  res[, depositVolumeUSD := as.numeric(depositVolumeUSD) / 1e18]
  res[, debitVolumeUSD := as.numeric(debitVolumeUSD) / 1e18]
  res[, depositChangedUSD := as.numeric(depositChangedUSD) / 1e18]
  res[, debitChangedUSD := as.numeric(debitChangedUSD) / 1e18]
  res[, debitExchangeRate := as.numeric(debitExchangeRate) / 1e18]
  res
  
}


getLoansDailyCollateralQuery <- function(endpoint, window) {
  method <- 'dailyCollaterals'; maxn <- 1000
  
  cli <- GraphqlClient$new(url = endpoint)
  mindate <- today(tzone = 'UTC') - window
  
  
  cursor <- ''
  resList <- list()
  for (i in 1:maxn) {
    if (cursor == '') {
      cursorStr <- 'first:100'
    } else {
      cursorStr <- 'first:100 after:"' %+% cursor %+% '"'
    }
    qry <- Query$new()
    qry$query(method, '
      {
        query {
          ' %+% method %+% ' (filter: {timestamp: {greaterThanOrEqualTo: "' %+% mindate %+% '"}} ' %+% cursorStr %+% ') {
            totalCount
            edges {
              node { 
               id collateral {id} depositAmount debitAmount depositVolumeUSD debitVolumeUSD 
               depositChangedUSD debitChangedUSD debitExchangeRate timestamp txCount
              }
              cursor
            }
            pageInfo {
              endCursor
              hasNextPage
            }
          }
        }
      }')
    result <- cli$exec(qry$queries[[method]])  %>%
      fromJSON(flatten=TRUE)
    cursor <- result$data$query[[method]]$pageInfo$endCursor
    res <- as.data.table(result$data$query[[method]]$edges)
    res[, cursor := NULL]
    
    print(i %+% " " %+% nrow(res))
    resList[[i]] <- res
    if (result$data$query[[method]]$pageInfo$hasNextPage == FALSE) break
  }
  res <- rbindlist(resList) %>% 
    setnames(names(res), gsub("node.", "", names(res)))
  res[, Date := as.Date(timestamp)]
  res[, collateral.id := subscanr::fixToken(collateral.id)]
  res <- merge(res, subscanr::tokens, by.x='collateral.id', by.y='Token')

  res[, adj := as.numeric(substr(as.character(1e20),1, as.numeric(decimals) + 1))]
  res[, depositAmount := as.numeric(depositAmount) / adj]
  res[, debitAmount := as.numeric(debitAmount) / adj]
  
  res[, depositVolumeUSD := as.numeric(depositVolumeUSD) / 1e18]
  res[, debitVolumeUSD := as.numeric(debitVolumeUSD) / 1e18]
  res[, depositChangedUSD := as.numeric(depositChangedUSD) / 1e18]
  res[, debitChangedUSD := as.numeric(debitChangedUSD) / 1e18]
  res[, debitExchangeRate := as.numeric(debitExchangeRate) / 1e18]
  res

}

getSwapsDex <- function(endpoint, window) {
  # endpoint <- dex_endpoint; window <- 10
  
  # make a client
  cli <- GraphqlClient$new(url = endpoint)
  mindate <- today(tzone = 'UTC') - window
  
  cursor <- ''
  resList <- list()
  for (i in 1:1000) {
    if (cursor == '') {
      cursorStr <- 'first:100'
    } else {
      cursorStr <- 'first:100 after:"' %+% cursor %+% '"'
    }
    qry <- Query$new()
    qry$query('swaps', '
    {
      query {
        swaps (filter: {timestamp: {greaterThanOrEqualTo: "' %+% mindate %+% '"}} ' %+% cursorStr %+% ') {
          totalCount
          edges {
            node { 
                id address {
                  id
                } pool {
                  id
                }  token0 {
                  id
                } token1 {
                  id
                } token0InAmount token1OutAmount
							  tradePath price0 price1 block {
							    id
							  } extrinsic {
							    id
							  } timestamp
            }
            cursor
          }
          pageInfo {
            endCursor
            hasNextPage
          }
        }
      }
    }')
    result <- cli$exec(qry$queries$swaps)  %>%
      fromJSON(flatten=TRUE)
    cursor <- result$data$query$swaps$pageInfo$endCursor
    res <- as.data.table(result$data$query$swaps$edges)
    res[, cursor := NULL]
    
    print(i %+% " " %+% nrow(res))
    resList[[i]] <- res
    if (result$data$query$swaps$pageInfo$hasNextPage == FALSE) break
  }
  res <- rbindlist(resList)
  setnames(res, old = names(res), new = gsub("node.", "", names(res)))
  
  if (substr(max(res$timestamp), 12, 13) < 23) {
    maxdate <- as.Date(max(res$timestamp))-1
  } else {
    maxdate <- as.Date(max(res$timestamp))
  }
  
  res <- res[timestamp <= maxdate]
  res[, date := as.Date(timestamp)]
  setorder(res, timestamp)
  
  # Replace foreign assets
  res[, token0.id := subscanr::fixToken(token0.id)]
  res[, token1.id := subscanr::fixToken(token1.id)]

  # Normalize pairs
  res[, pair := paste0(token0.id %+% ":" %+% token1.id)]
  res[token1.id < token0.id, pair := paste0(token1.id %+% ":" %+% token0.id)]
  res[, exclude := token0.id == token1.id]
  res  
  
}


```


```{r q1}
print(loan_endpoint)
# queries ####
dailyLoanCollateral <- getLoansDailyCollateralQuery(loan_endpoint, window)
```

```{r q2}
dailyLoanPositions <- getLoansDailyPositionsQuery(loan_endpoint, window)
```

```{r q3}
collaterParams <- getLoansCollateralParamsQuery(loan_endpoint)
```

```{r q4}
liquidity <- liquidityQuery(swap_endpoint, window)
liquidity[, volumeUSD := as.numeric(volumeUSD) / 1e18]
liq <- liquidity[, .(date, pair, type, volumeUSD)]
liq2 <- liq[, .(.N, sum(volumeUSD)), by = .(pair, date, type)]
setnames(liq2, c("date","N","V2"), c("Date","Observations","volumeUSD"))
liq2[type == 'removeLiquidity', volumeUSD := -volumeUSD]


liq <- liq[, .(.N, sum(volumeUSD)), by = .(date, type)]
setnames(liq, c("date","N","V2"), c("Date","Observations","volumeUSD"))
liq[type == 'removeLiquidity', volumeUSD := -volumeUSD]
```

```{r q6}

# swaps2 <- getSwapsByDay(swap_endpoint, window)
swaps2 <- getDailyPoolsQuery(dex_endpoint, window)
swaps <- getSwapsDex(dex_endpoint, window)
# swaps <- getSwaps(official_endpoint, window)
# swaps[, volumeUSDFloat := as.numeric(volumeUSD)]
# swaps[volumeUSDFloat < 0]
# swaps[volumeUSDFloat < 0, id]

swaps <- merge(swaps, subscanr::tokens, by.x='token0.id', by.y='Token') %>% setnames("decimals","decimals0")
swaps[, Name := NULL]
swaps <- merge(swaps, subscanr::tokens, by.x='token1.id', by.y='Token') %>% setnames("decimals","decimals1")
swaps[, Name := NULL]

swaps[, adj0 := as.numeric(substr(as.character(1e20),1, as.numeric(decimals0) + 1))]
swaps[, adj1 := as.numeric(substr(as.character(1e20),1, as.numeric(decimals1) + 1))]

swaps[, token0InAmount := as.numeric(token0InAmount)]
swaps[, token1OutAmount := as.numeric(token1OutAmount)]
swaps[, price0 := as.numeric(price0) / 1e18]
swaps[, price1 := as.numeric(price1) / 1e18]

swaps[, amount0 := token0InAmount / adj0]
swaps[, amount1 := token1OutAmount / adj1]

swaps[, token0.id := subscanr::fixToken(token0.id)]
swaps[, token1.id := subscanr::fixToken(token1.id)]
swaps[, tradePath := subscanr::fixToken(tradePath)]
swaps[, pathLength := length(strsplit(tradePath, ",")[[1]]) - 1, by = id]

swaps[, volume0USD := amount0 * price0]
swaps[, volume1USD := amount1 * price1]
swaps[, volumeUSDFloat := (volume0USD + volume1USD) / 2]
swaps[volume0USD == 0 & volume1USD > 0, volumeUSDFloat := volume1USD]
swaps[volume1USD == 0 & volume0USD > 0, volumeUSDFloat := volume0USD]

mysort <- function(a, b) ifelse(a < b, a %+% ":" %+% b, b %+% ":" %+% a)

getPath <- function(tradePath) {
  # tradePath <- swaps[1]$tradePath
  tp <- strsplit(tradePath, ",")[[1]]
  n <- length(tp) - 1
  if (n == 3) {
    return(list(mysort(tp[1],tp[2]), mysort(tp[2],tp[3]), mysort(tp[3],tp[4])))
  } else if (n == 2) {
    return(list(mysort(tp[1],tp[2]), mysort(tp[2],tp[3]), "NA:NA"))
  } 
  list(mysort(tp[1],tp[2]), "NA:NA", "NA:NA")
}
swaps[, c("pair1", "pair2", "pair3") := getPath(tradePath), by = id]

swaps[, fee := volumeUSDFloat * .03]
swaps[, feeAdj := volumeUSDFloat * .03 * pathLength]
setnames(swaps, "address.id", "accountId")
# setnames(swaps, "AccountId", "accountId")


pairs <- rbind(swaps[exclude == FALSE, .N, by = pair1] %>% setnames("pair1", "Pair"),
              swaps[exclude == FALSE, .N, by = pair2] %>% setnames("pair2", "Pair"),
              swaps[exclude == FALSE, .N, by = pair3] %>% setnames("pair3", "Pair"))
pairs <- pairs[, sum(N), by = Pair]
# remove pairs with NA in them
pairs <- pairs[-grep("NA", pairs$Pair)]
pairs <- rbind(data.table(Pair = "ALL", V1 = sum(pairs$V1)), pairs)
pairs <- pairs[order(V1, decreasing = TRUE)] %>%
  setnames(c("Pair", "Observations"))


tvl <- swaps2[date == max(date)]
stable_dex_pool_size <- tvl[grep("USD", tvl$pair), sum(abs(tvlUSD))]

# Calculate measures for each pair
user_status   <- list()
trades_status <- list()
tpu_status    <- list()
volume_status <- list()

users_list  <- list()
trades_list <- list()
per_list    <- list()
volume_list <- list()

# remove old params object before calling render with new params list
rm(params)
for (p in pairs$Pair) {
  # p <- pairs$Pair[1]
  
  try(rm(u_list, t_list, p_list, v_list), silent = TRUE)
  
  outname <- "~/R_HOME/websites/web_acala/content/swap_" %+% network %+% "_" %+% p %+% ".html"
  unlink(outname)
  # Create report for each pair
  rmarkdown::render("~/R_HOME/karura-reports/Swap_template.Rmd",
                  output_file = outname,
                  params = list(pair = p))
  
  # Store the data for the table
  user_status[p]   <- activeUsersStatus
  trades_status[p] <- tradesStatus
  tpu_status[p]    <- avgTradeStatus
  volume_status[p] <- tradeVolumeStatus
  
  users_list[[p]]  <- u_list
  trades_list[[p]] <- t_list
  per_list[[p]]    <- p_list
  volume_list[[p]] <- v_list

}

  d <- list()
  for (x in pairs$Pair) {
    d[x] <- paste0('', x, '', collapse = '')
  }

  inline_plot <- data.frame(Count = pairs$Observations, 
                            U_Growth = unlist(user_status),
                            U_Trend = "",
                            S_Growth = unlist(trades_status),
                            S_Trend = "",
                            TPU_Growth = unlist(tpu_status),
                            TPU_Trend = "",
                            V_Growth = unlist(volume_status),
                            V_Trend = "")
  row.names(inline_plot) <- unlist(d)

  getSpecColor <- function(x) {
    x[is.na(x)] <- 0
    ifelse(x < 1, "red", "green")
  }
  
  inline_plot$U_Growth <- cell_spec(inline_plot$U_Growth, color = getSpecColor(inline_plot$U_Growth))

  inline_plot$S_Growth <- cell_spec(inline_plot$S_Growth, color = getSpecColor(inline_plot$S_Growth))
  
  inline_plot$TPU_Growth <- cell_spec(inline_plot$TPU_Growth, color = getSpecColor(inline_plot$TPU_Growth))

  inline_plot$V_Growth <- cell_spec(inline_plot$V_Growth, color = getSpecColor(inline_plot$V_Growth))

  p <- inline_plot %>%
    kbl(booktabs = TRUE, escape = FALSE, align='rrrrrrrrr') %>%
    add_header_above(c(" " = 1, " " = 1, "Active Users" = 2, "Swap Trades" = 2, "Trades Per User" = 2, "Trading Volume" = 2)) %>%  
    kable_paper(full_width = FALSE) %>%
    column_spec(4, image = spec_plot(users_list, same_lim = FALSE)) %>%
    column_spec(6, image = spec_plot(trades_list, same_lim = FALSE)) %>%
    column_spec(8, image = spec_plot(per_list, same_lim = FALSE)) %>%
    column_spec(10, image = spec_plot(volume_list, same_lim = FALSE))

```

### `r network` Swap Performance Summary

```{r plot_acala, result='asis', out.height = 12}
p

```

Last updated: `r Sys.time()`

Date range of data: `r min(swaps$timestamp)` to `r max(swaps$timestamp)`.

Sources: 

* [SubQuery Network](https://explorer.subquery.network/)

Swaps:

* [Acala-Swap-Day-Data](https://api.subquery.network/sq/rogerjbos/acala-swap-day-data)

* [Karura-Swap-Day-Data](https://api.subquery.network/sq/rogerjbos/karura-swap-day-data)

Loans:

* [Acala-Loan-Data](https://api.subquery.network/sq/rogerjbos/acala-loan-subql)

* [Karura-Loan-Data](https://api.subquery.network/sq/rogerjbos/karura-loan-subql)